import Https from '@/utils/https'

// 接口测试
const queryTestReq = (params) => Https.post('/api/v1/integration/api/ws/test', params, { needCode: true })

// 预览
const queryPreviewReq = (params) => Https.post('/api/v1/integration/api/ws/preview', params, { needCode: true })

// 获取数据目标
const queryGetDatabasesReq = (params) => Https.get('/api/v1/integration/api/ws/getDatabases', params)

// 获取目标表
const queryGetTargetTablesReq = (params) => Https.get('/api/v1/integration/api/ws/getTargetTables', params)

// 获取一键建表语句
const queryGetCreateTableDDLReq = (params) => Https.post('/api/v1/integration/api/ws/getCreateTableDDL', params)

// 一键建表
const querySaveTargetTableReq = (params) => Https.post('/api/v1/integration/api/ws/saveTargetTable', params)

// 字段映射
const queryGetTagetTableFieldsReq = (params) => Https.get('/api/v1/integration/api/ws/getTagetTableFields', params)

// 新建-保存编辑任务
const querySaveTaskReq = (params) => Https.post('/api/v1/integration/api/ws/saveTask', params, { needCode: true })

// 查看任务
const queryGetTaskByIdReq = (params) => Https.get('/api/v1/integration/api/ws/getTaskById', params)

// 根据wsdl服务地址获取端口号和方法列表
const queryGetWsdlPortOperationMapReq = (params) => Https.post('/api/v1/integration/api/ws/getWsdlPortOperationMap', params, { needCode: true })

export {
  queryTestReq, queryPreviewReq, queryGetDatabasesReq, queryGetTargetTablesReq, queryGetCreateTableDDLReq, querySaveTargetTableReq, queryGetTagetTableFieldsReq, querySaveTaskReq, queryGetTaskByIdReq, queryGetWsdlPortOperationMapReq,
}
